<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/6/26
 * Time: 17:07
 */
	namespace Home\Controller;
    use Think\Controller;
    class BaseController extends Controller
    {
        function _initialize()
        {
            if ($_SESSION['user_name']) {
                $cartOb=M('Cart');
                $re=$cartOb->where("cart_user_name='{$_SESSION['user_name']}'")->count();
                $this->assign('re',$re);
            }
        }
    }